<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>DEPUI/DEGFX/DETK: GPL Portable source code libraries</TITLE>
</HEAD>
<BODY>

<FONT SIZE=6>DEPUI, DEGFX and DETK</FONT><BR>
<FONT SIZE=4>Portable gui, graphics and toolkit source code libraries under a GPL licence</FONT><BR>
<a href="depui30.zip">Download DEPUI 3.0 (stable)</a> (includes DEPUI, DEGFX and DETK)<BR>
Page at <a href="http://freshmeat.net/projects/depui/">Freshmeat</a><BR>
Work-in-progress <a href="depui31.zip">DEPUI 3.1 WIP</a> and <a href="history.txt">history</a><BR>
Doug Eleveld (deleveld@dds.nl)

<HR>
<FONT SIZE=6>DEPUI 3.0 - A GPL portable gui library</FONT><BR>
<A HREF="depui.jpg"><IMG SRC="depuith.jpg"></A>
<A HREF="depui1.jpg"><IMG SRC="depui1th.jpg"></A>
<A HREF="depui2.jpg"><IMG SRC="depui2th.jpg"></A>
<BR>
DEPUI is a small extremely portable user interface library.  It uses an object oriented C API with reference counting for many of the objects.
Platform dependant functions are all kept in a single file and allow run-time theme changes.  DEPUI is independant of the
supporting graphics library, all platform dependent functions are in a single file.  Support for platforms DEGFX and Allegro
is included.
<UL>
<LI>Clean object oriented C API</LI>
<LI>Memory efficient and fast</LI>
<LI>Extensive documentation using <a href="http://www.deleveld.dds.nl/mxdoc.htm">MXDOC</a> and
<a href="http://www.doxygen.org/">Doxygen</a></LI>

<LI>Separated into modules: gui, graphics (DEGFX or Allegro) and toolkit (DETL)</LI>
<LI>Themes and GFX mode changable at runtime</LI>
<LI>Widgets:
    <UL>
    <LI>Text objects</LI>
    <LI>Buttons</LI>
    <LI>Horizontal and vertical sliders</LI>
    <LI>Scrollable area</LI>
    <LI>Lists with scrollbars if necessary</LI>
    <LI>Windows and window borders</LI>
    <LI>Child windows and modal windows</LI>
    <LI>GFXmode/theme window</LI>
    <LI>File selector window</LI>
    </UL></LI>
<LI>Objects can be transparent and can have any shape</LI>

<LI>Library source is completly self-contained - You dont have to link to external libraries, not even to DEPUI!</LI>

<LI>DEPUI uses #define flags to determine which modules to use.  This guarantees that only the portions of DEPUI that you 
actually use get included in your executable.</LI>

<LI>All platform dependant code in a single file for platform/theme code</LI>
<LI>Pre-built platforms for:
    <UL>
    <LI>DEGFX (tested with DJGPP, MINGW32, BCC32, LCC, Open Watcom)</LI>
    <LI>Allegro (tested with DOS)</LI>
    </UL>
</LI>

<LI>Runs on almost any hardware, even my 40 MHz 386 test machine</LI>
<LI>Compiles with no changes on MSB first or LSB first hardware</LI>
<LI>Open source and GPL licence</LI>
</UL>

<HR>
<FONT SIZE=6>DEGFX 1.0 - A GPL portable graphics library</FONT><BR>
<A HREF="degfx.jpg"><IMG SRC="degfxth.jpg"></A><BR>
DEGFX is a small extremely portable graphics library.  It has only 6 (!) platform dependant functions. It uses a clean
object oriented C API with reference counting and delete locking for (almost) all the objects.  The library supports transparency for bitmaps and
all drawing functions and antialiased fonts.  The user has very fast pixel level access to bitmaps using
iterators.  DEGFX has no external library dependencies.  Compared to other portable graphics libraries DEGFX is:
<UL>
    <LI>Smaller and simpler than Allegro or SDL</LI>
    <LI>Fast alpha-blending (transparency, anti-aliasing) built into all drawing functions</LI>
    <LI>Color conversions are completely hidden to the user</LI>
    <LI>More graphic functions (line, blit) than SDL</LI>
    <LI>More portable than SDL (doesn't need threads)</LI>
    <LI>Guaranteed flicker-free graphics without double buffering the entire display</LI>
    <LI>Library source is completly self-contained - You dont have to link to external libraries, not even to DEGFX!</LI>
    <LI>Easy to determine which modules (drivers, fonts etc...) are included in the executable</LI>
</UL>
DEGFX uses a different approach than most graphics libraries.
<UL>
    <LI>DEGFX makes no attempt to handle bitmaps of different color depths and works internally only with 32 bit ARGB pixel
    format.  This makes the library internally very simple.  Bitmap are only converted to the screen color depth when writing to the screen.  This has the advantage
    that the library internals are very simple because they only have to deal with 32 bit ARGB pixel format.  This also allows
    transparency and alpha-blending to be used even for monochrome, 4-bit and 8-bit displays.  Although admittedly
    a program that makes heavy use of antialiasing and transparency might not look very good on a 4-bit display.</LI>
    
    <LI>DEGFX uses a partial double buffer system that guarantees no screen flicker when drawing but uses a
    lot less memory than full double buffering.  Only a portion of the screen is buffered at a time and the users
    redraw function is called multiple times with different clipping settings.  Because a clipped graphics drawing
    can be made very fast, calling the update function many times is hardly slower than full double buffering.  In fact
    the smaller buffer sometimes be faster than full screen buffering because of better cache behavior.  In any case you can
    choose how much memory you want to use for the screen buffer (even during runtime) so you can do do full double
    buffering if you want to, or use minimal memory and tolerate a slightly slower screen update speed.</LI>
    
    <LI>DEGFX does not require linking to a library, you include the DEGFX C source code directly into you own programs.
    So installing or removing DEGFX from your system is as simple as moving or deleting a directory from your
    compilers include path.  Using this method can cause long compile times since you are essentially compiling the library
    every time you compile your program.  But if you include DEGFX in a separate object file you can solve this problem.</LI>

    <LI>DEGFX uses #define flags to determine which modules to use.  This guarantees that only the portions of DEGFX that you 
    actually use get included in your executable.</LI>
</UL>
Some Features:
<UL>
<LI>Object oriented C API with attention to maximum type safety. </LI>
<LI>Fast, unified transparency support</LI>
<UL>
    <LI>Plot a solid blue pixel: mx_pixel(x, y, MXRGB(0,0,255));</LI>
    <LI>Same pixel with 50% transparency: mx_pixel(x, y, MXRGBT(0,0,255,128));</LI>
    <LI>RBG and RGBT colors are compile time macro for fast execution</LI>
    <LI>Transparency works for ALL displays even 8 bit and 4 bit graphic modes</LI>
</UL>
<LI>Unified reference counting for many objects</LI>
<LI>Platform driver may use dirty-rectangle buffer system for fast flicker-free screen updates</LI>
<LI>Copying to screen is localized by buffer system so banked modes work almost as fast as linear modes</LI>
<LI>Bitmap support:</LI>
<UL>
    <LI>Pixel RGB colors (32 bit ARGB) are compile time constants</LI>
    <LI>Color conversions are completely hidden from user</LI>
    <LI>Unified transparency support</LI>
    <LI>Drawing functions: pixel, line, blit, etc...</LI>
    <LI>Drawing functions are simple and fast because only 32 bit ARGB is needed</LI>
    <LI>Very fast pixel-level access using iterators</LI>
    <LI>Functions to load bitmaps from files (PCX, TGA, GIF)</LI>
    <LI>Named colors similar to X11</LI>
    <LI>Reference counting</LI>
</UL>
<LI>Font support:</LI><UL>
<LI>Support for bitmapped fonts and antialiased fonts</LI>
<LI>UTF-8 encoding</LI>
<LI>Loadable from bitmap (similar format as Allegro)</LI>
<LI>Allegro's TTF2PCX utility can be used to make loadable TTF fonts</LI>
<LI>Reference counting</LI>
</UL>

<LI>Simple mouse and keyboard support</LI>
<LI>DEGFX source compiles inside your own source code
    <UL>
    <LI>Installing/removing the library means simply copying/deleting a directory in your compilers include path</LI>
    <LI>No need to use library tools</LI>
    </UL></LI>
<LI>Currently available drivers:</LI>
<UL>
    <LI>DOS   - DJGPP VESA 1.2(banked) and 2.0(linear)</LI>
    <LI>DOS   - DJGPP standard VGA (640x480x4)</LI>
    <LI>DOS   - DJGPP VGA mode 13h (320x200x8)</LI>
    <LI>Linux - Svgalib *** has problems ***</LI>
    <LI>Win32 - MINGW32 using GDI</LI>
    <LI>Win32 - Borlands free compiler BCC32 using GDI</LI>
    <LI>Win32 - LCC using GDI</LI>
    <LI>Win32 - Open Watcom target Win32 (GDI)</LI>
    <LI>Sinclair QL - QDOS *** in development ***</LI>
</UL>
<LI>Low memory requirements when using 'partial' double buffer</LI>
<LI>Buffering mode can be changed on the fly</LI>
<LI>Extremely portable: only 6 (!) platform dependant functions</LI>
<UL>
    <LI>start, stop, poll, dirty, keypress, mouse info</LI>
</UL>
<LI>Runs on almost any hardware, even my 40 MHz 386 test machine</LI>
<LI>Compiles with no changes on MSB first or LSB first hardware</LI>
<LI>Open source and GPL licence</LI>
</UL>

<HR>
<FONT SIZE=6>DETK 1.0 - A portable toolkit library</FONT><BR>
DETK is a small toolkit library for commonly used functions

<UL>
<LI>MX_ATOM base class for reference counting</LI>
<LI>MX_RECT simple rectangle struct</LI>
<LI>MX_RECTATOM rectangle with reference counting (derived from MX_ATOM)</LI>
<LI>MX_VECTOR utility for handling vector of objects</LI>
<LI>Optional wrapper for malloc/realloc/free does simple header/footer corruption checking</LI>
<LI>A few very simple UTF-8 functions</LI>
<LI>DETK source compiles inside your own source code
    <UL>
    <LI>Installing/removing the library means simply copying/deleting a directory in your compilers include path</LI>
    <LI>No need to use library tools</LI>
    </UL></LI>
<LI>Compiles with no changes on MSB first or LSB first hardware</LI>
<LI>Open source and GPL licence</LI>
</UL>

<HR>
<FONT SIZE=6>Library structure diagram for DEPUI, DEGFX and DETK</FONT>
<BR>If DEPUI platform is set to DEGFX then the library structure is:
<FONT SIZE=3><PRE>
    +------------------------------------------------------------+
    |                        DETK library                        |
    +----------------+-----------+-------------------+-----------+
                     |           |                   |
                     |           |                   |
    +------------+---+---+-------+-------+           |
    |  Hardware  |       |               |           |
    +------------+       |               |           |
    |  struct MX_DRIVER  |               |           |
    +--------------------+               |           |
    |           DEGFX library            |           |
    +----------+-------------------------+           |
               |                                     |
               |                                     |
    +----------+---------------+---------------------+-----------+
    |  Platform/Theme driver   |                                 |
    +--------------------------+                                 |
    |                        DEPUI library                       |
    +------------------------------------------------------------+
</PRE></FONT>
<BR>Another possibility is if DEPUI uses Allegro as its platform:
<FONT SIZE=3><PRE>
    +----------+---------+---------------+
    |      Hardware      |               |
    +--------------------+               |
    |               Allegro              |
    +----------+-------------------------+
               |
               |                       +-------------------------+
               |                       |      DETK library       |
               |                       +-------------+-----------+
               |                                     |
    +----------+---------------+---------------------+-----------+
    |  Platform/Theme driver   |                                 |
    +--------------------------+                                 |
    |                        DEPUI library                       |
    +------------------------------------------------------------+
</PRE></FONT>
<HR>
<FONT SIZE=6>Inheritance tree for DEPUI, DEGFX and DETK</FONT>
<FONT SIZE=3><PRE>
DEGFX main functions:
    mx_guimain
    mx_start
    mx_execute

    MX_VECTOR - An almost typesafe C vector for objects of any size
       mx_vector
       mx_vector_free
       mx_vector_set
       mx_vector_reserve
       mx_vector_append
       mx_vector_remove
       mx_vector_insert
       mx_vector_resize
       mx_vector_contract

    MX_STRING - Small class for string handling
       mx_string
       mx_string_free
       mx_string_set
       mx_string_text

    MX_RECT - Simple rectangle

    MX_EVENT - Gui event type
       mx_event
       mx_emit
       mx_inform
       mx_answer 

    MX_ATOM - Base class for reference counting
     | mx_delete
     | mx_lock
     | mx_unlock
     |
     +- MX_FONT - Normal or antialiased fonts
     |     mx_font_draw
     |     mx_font_drawblock
     |     mx_font_width
     |     mx_font_height
     |     mx_font_blocksize
     |     mx_font_bitmap
     |     mx_font_pcx
     |
     +- MX_RECTATOM - Reference counted rectangle
         | mx_x1
         | mx_y1
         | mx_x2
         | mx_y2
         | mx_w
         | mx_h
         |
         +- MX_BITMAP - 32 bit RGBA bitmap
         |     mx_bitmap
         |     mx_bitmap_tga
         |     mx_bitmap_pcx
         |     mx_iter
         |     mx_getpixel
         |     mx_pixel
         |     mx_vline
         |     mx_hline
         |     mx_rect
         |     mx_blit
         |     mx_blittrans
         |     mx_blitcopy
         |     mx_blitstretch
         |     mx_box
         |     mx_frame
         |
         +- MX_OBJ - Gui base object
             | mx_obj 
             | mx_x
             | mx_y
             | mx_resize
             | mx_move
             | mx_position
             | mx_place
             | mx_geometry
             | mx_defaultrect
             | mx_armed
             | mx_armable
             | mx_is_armable
             | mx_selected
             | mx_selectable
             | mx_is_selectable
             | mx_disabled
             | mx_arm
             | mx_select
             | mx_disable
             | mx_focus
             | mx_unfocus
             | mx_wantmove
             | mx_layout
             | mx_top
             | mx_dirty
             |
             +- MX_WINBORDER - Border for a window
             |
             +- MX_SLIDER - Drag/click slider
             |     mx_slider 
             |     mx_slider_set
             |     mx_slider_to
             |     mx_slider_value
             |
             +- MX_TEXTUAL - Base class for objects with text
                 | mx_textual
                 | mx_text
                 | mx_text_set
                 | mx_text_align
                 | mx_text_align_get
                 | mx_text_height
                 | mx_text_width
                 |
                 +- MX_BUTTON - Clickable button
                 |   | mx_button
                 |   |
                 |   +- MX_LISTELEM - Clickable element for a MX_LIST
                 |         mx_listelem
                 |
                 +- MX_SCROLL - Generic scrollable area
                 |   | mx_scroll 
                 |   |
                 |   +- MX_LIST - Vertical list of selectable objects
                 |         mx_list
                 |         mx_list_select_id
                 |         mx_list_selected_id
                 |         mx_list_selected
                 |         mx_list_append
                 |         mx_list_multiple
                 |         mx_list_iter
                 |
                 +- MX_WIN - Standard (or child) window
                     | mx_win
                     | mx_active
                     | mx_activate
                     | mx_child
                     | mx_modal
                     | mx_win_dirty
                     |
                     +- MX_GFXMODE - Graphics mode and theme selector
                     |     mx_gfxmode
                     |
                     +- MX_FILESEL - File selector
                           mx_filesel
                           mx_filesel_info 
                           mx_filesel_path
                           mx_filesel_refresh
</PRE>
</FONT>        

</BODY>
</HTML>
